import { default as request, cloud } from "@/framework/utils/request";
// 购物车查询接口
export function getShopCart(params) {
  return request({
    url: `${cloud.mall}/tMgdShopcar/pageList`,
    method: "get",
    params,
  });
}
// 购物车更新接口
export function updateShoppingCart(params) {
  return request({
    url: `${cloud.mall}/tMgdShopcar/update`,
    method: "post",
    params,
  });
}
// 购物车删除接口
export function deleteGoods(data) {
  return request({
    url: `${cloud.mall}/tMgdShopcar/delete`,
    method: "post",
    data,
  });
}
// 去结算页接口
export function shoppingCartBill(data) {
  return request({
    url: `${cloud.mall}/tModOrder/to-order-sure`,
    method: "post",
    data,
  });
}
// 首页轮播图banner接口
export function getBanners(params) {
  return request({
    url: `${cloud.mall}/homepage/banners`,
    method: "get",
    params,
  });
}
//首页轮播图点击收费接口
export function tMadAdRecrodAdd(data) {
  return request({
    url: `${cloud.mall}/tMadAdRecrod/add`,
    method: "post",
    data,
  });
}

// 首页分类接口
export function getCategoryShow(params) {
  //一级分类ID
  return request({
    url: `${cloud.mall}/homepage/categoryShow`,
    method: "get",
    params,
  });
}
// 首页猜你喜欢接口
export function getMostView(params) {
  return request({
    url: `${cloud.mall}/homepage/mostView`,
    method: "get",
    params,
  });
}
// 首页购物车接口
export function getShoppingcarInfo(params) {
  return request({
    url: `${cloud.mall}/homepage/getShoppingcarInfo`,
    method: "get",
    params,
  });
}

// 商品分类接口
export function getCategoryList(params) {
  //二级分类ID
  return request({
    url: `${cloud.mall}/homepage/getCategoryList`,
    method: "get",
    params,
  });
}

//搜索商品接口
export function backstagePageList(params) {
  return request({
    url: cloud.mall + "/goods/backstagePageList",
    method: "get",
    params,
  });
}
//搜索店铺接口
export function tMallInfoSalesVolume(params) {
  return request({
    url: cloud.mall + "/tMallInfoSalesVolume/page",
    method: "get",
    params,
  });
}

// 查询购物车商品数量
export function tMgdShopcarPageList(params) {
  return request({
    url: cloud.mall + "/tMgdShopcar/pageList",
    method: "get",
    params,
  });
}

//后台订单管理十个页面的接口
export function orderPageListForSeller(params) {
  return request({
    url: cloud.mall + "/tModOrder/orderPageListForSeller",
    method: "get",
    params,
  });
}
//后台订单管理详情接口
export function getOrderDetails(params) {
  return request({
    url: cloud.mall + "/tModOrder/getOrderDetails",
    method: "get",
    params,
  });
}

//后台订单状态修改接口
export function orderUpdate(data) {
  return request({
    url: cloud.mall + "/tModOrder/update",
    method: "post",
    data,
  });
}
//宝贝收藏列表
export function tMgdCollectPage(params) {
  return request({
    url: cloud.mall + "/tMgdCollect/page",
    method: "get",
    params,
  });
}

//店铺收藏列表
export function tMallCollectList(params) {
  return request({
    url: cloud.mall + "/tMallCollect/collect/list",
    method: "get",
    params,
  });
}
//取消收藏接口
export function cancelMallCollect(data) {
  return request({
    url: cloud.mall + "/tMallCollect/collect",
    method: "post",
    data,
  });
}

//更新订单管理状态码

export function updateStatus(data) {
  return request({
    url: cloud.mall + "/tModOrder/updateStatus",
    method: "post",
    data,
  });
}

//新增订单评论接口
export function tModOrderEvaAdd(data) {
  return request({
    url: cloud.mall + "/tModOrderEva/add",
    method: "post",
    data,
  });
}
//获取评价管理查询所有数据接口
export function tModOrderEvaPage(params) {
  return request({
    url: cloud.mall + "/tModOrderEva/page",
    method: "get",
    params,
  });
}
//获取评价管理单条数据详情
export function tModOrderEvaDetail(params) {
  return request({
    url: cloud.mall + "/tModOrderEva/detail",
    method: "get",
    params,
  });
}

//删除订单评论接口
export function tModOrderEvaDelete(data) {
  return request({
    url: cloud.mall + "/tModOrderEva/delete",
    method: "post",
    data,
  });
}

//后台订单评价获取接口
export function tModOrderEvaPageForSeller(params) {
  return request({
    url: cloud.mall + "/tModOrderEva/pageForSeller",
    method: "get",
    params,
  });
}

//后台订单评价回复接口
export function tModOrderEvaReplay(data) {
  return request({
    url: cloud.mall + "/tModOrderEva/replay",
    method: "post",
    data,
  });
}
